package springdidemo.demos;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class StudentController {
//    @Autowired
//    @Qualifier("u2")

     @Resource(name="u2")
//    @Autowired
     public Student stu;
     public void say(){
         System.out.println("hi stucontroller");
         stu.say();
         System.out.println(stu);
     }
}
